#include <buola/gui.h>

#include <buola/image/cimage.h>
#include <buola/image/cgc.h>

#include <buola/gui/dnd/cdndwindow.h>

namespace buola { namespace gui {

CDndWindow::CDndWindow()
{
    SetPaintMode(EPaintMode::TRANSPARENT);
    SetBackColor({0,0,0,0});
    SetWindowType(EWindowType::DND);
}

CDndWindow::~CDndWindow()
{
}

void CDndWindow::SetImage(const img::CPicture &pImage)
{
    mImage=pImage;

	Refresh();
}

///////////////// events //////////////////

void CDndWindow::OnExpose(const CExposeEvent &pE)
{
	pE.mGC->SetOperator(img::ECompOp::SRC);
	pE.mGC->DrawImage(CPoint_d(0,0),mImage);
}


/*namespace gui*/ } /*namespace buola*/ }
